import { IsBoolean, IsNotEmpty, IsString, MaxLength } from 'class-validator';

export class CreatePermissionDto {

  @MaxLength(100)
  @IsString()
  @IsNotEmpty()
  key: string;

  @MaxLength(512)
  @IsString()
  description: string = '';

  @IsBoolean()
  @IsNotEmpty()
  onlyAdmin: boolean = false;

  @IsString()
  @IsNotEmpty()
  apiList: string = '';
}
